import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

let defCityName = '上海';
defCityName = localStorage.city;
const state = {
    city: defCityName
}

const mutations = {
    changCity(state,Cityname) {
        state.city = Cityname
        localStorage.city = Cityname;
    }
}

export default new Vuex.Store({

    state,
    mutations

})